Skip to content

Campaign tracking guides: Campaign Cart SDK 0.5.2 - #81

Open
next-devin wants to merge 2 commits into
mainfrom
tracking-sdk-052
Open

next-devin wants to merge 2 commits into
mainfrom
tracking-sdk-052

Conversation

@next-devin

Copy link
Copy Markdown
Contributor

The starter templates now load Campaign Cart SDK 0.5.2. This brings the rest of the campaign tracking guides in line with it, after #77. Every behaviour below was checked against the SDK source at v0.5.2 (src/analytics/, src/compat/analytics/, src/engine/visit/). The 0.4.43 links stay only where a campaign still on 0.4.x needs them.

google-tag-manager.mdx

  • Says which SDK version the page covers and where to find a campaign's sdk_version.
  • Notes the newer analytics.destinations.gtm.enabled switch; destinations wins when both are set.
  • dl_purchase timing: on 0.5.2 it fires on the checkout page when paid there, or on the first page the shopper returns to after an off-page payment (PayPal). The 0.4.x timing stays as a separate row.
  • Lists dl_generate_lead and dl_skipped_upsell. Says the dl_* format is deprecated but still sent. Corrects which user_properties each event carries on 0.5.2.
  • New "Keep an event out of GTM" section covers providers.gtm.blockedEvents (dl_* names) and destinations.gtm.blockedEvents (tracking names, 0.5.2). A destinations list replaces the providers list. A blocked event still reaches window.NextDataLayer.
  • Verify step covers ?debug=1 / ?debug=0. Adds a troubleshooting row for blocked events.
  • Hand-built campaigns: on 0.5.2 the SDK pushes to window.dataLayer by default, so only the container is needed. Links the GTM destination reference, plus next.analytics.on for custom shapes.

testing-and-troubleshooting.mdx

  • Test order step 4 gives the 0.5.2 and the 0.4.x purchase timing.
  • Replaces the 0.4.43 debugger link with a "See what the campaign sent" section for the 0.5.2 ?debug=1 panel. The 0.4.43 debugger link is kept for 0.4.x.
  • ?ignore=false turns tracking back on.
  • analytics.mode row is marked 0.4.x only (0.5.2 ignores it). New rows cover blockedEvents and a 0.5.2 missing purchase.

index.mdx

  • The developer reference table now has a 0.5.2 column (how it works, tracking events, destinations, GTM, URL parameters, next.actions.setMetadata, next.analytics.on, ?debug=1, migration guide) next to the 0.4.x column. The intro sentence is the same as Campaign Cart SDK 0.5.1 and 0.5.2 updates #77's, so the two PRs merge cleanly in either order.

everflow.mdx

  • The attribution link points at the 0.5.2 URL parameters page. The aff/affid and sub1–sub5 behaviour is unchanged.

getting-started.mdx, google-analytics-4.mdx

  • The purchase-timing sentences and verify steps give the 0.5.2 timing alongside 0.4.x. The starter GA4 adapter reads the SDK's dl_* stream, so it follows the same timing.

Checks: npm run validate-links, check-markup and check-frontmatter pass. npm run generate left no tracked files changed. Every cart-sdk.nextcommerce.com link in the section resolves.

The starter templates load SDK 0.5.2. Point the GTM, testing, Everflow
and overview pages at the 0.5.2 SDK reference, say when 0.5.2 sends the
purchase, document blockedEvents and the ?debug=1 panel, and keep the
0.4.43 links only for campaigns still on 0.4.x.
@next-devin
next-devin requested a review from masmalsah as a code owner December 4, 2026 05:06
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
developer-docs ce624f7 Commit Preview URL

Branch Preview URL
Dec 04 2026, 05:28 AM

@kilo-code-bot

kilo-code-bot Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
content/docs/campaigns/tracking/index.mdx 65 The intro's Events link points at the SDK's next.on reference; the tracking-event reference is /latest/analytics/, which the table below uses
Files Reviewed (2 files)
  • content/docs/campaigns/tracking/index.mdx - 1 issue
  • content/docs/campaigns/tracking/testing-and-troubleshooting.mdx - 0 issues

Fix these issues in Kilo Cloud

Previous Review Summary (commit bb8d22e)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit bb8d22e)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 2
Issue Details (click to expand)

SUGGESTION

File Line Issue
content/docs/campaigns/tracking/index.mdx 65 The intro's Events link points at the SDK's next.on reference; the tracking-event reference is /latest/analytics/, which the table below uses
content/docs/campaigns/tracking/testing-and-troubleshooting.mdx 78 The generic blocked-event row links only to the GTM section, which does not cover facebook.blockedEvents or ga4_blocked_events
Files Reviewed (6 files)
  • content/docs/campaigns/tracking/everflow.mdx - 0 issues
  • content/docs/campaigns/tracking/getting-started.mdx - 0 issues
  • content/docs/campaigns/tracking/google-analytics-4.mdx - 0 issues
  • content/docs/campaigns/tracking/google-tag-manager.mdx - 0 issues
  • content/docs/campaigns/tracking/index.mdx - 1 issue
  • content/docs/campaigns/tracking/testing-and-troubleshooting.mdx - 1 issue

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash-1017 · Input: 29.6K · Output: 7.1K · Cached: 367.2K

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant